﻿namespace HRM.CORE
{
    using APP.HELPER.Data.Helper;
    using APP.HELPER.Utils.CustomizeToolbox;
    using DevExpress.XtraEditors;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Data.SqlClient;
    using System.Windows.Forms; using Common;

    public class HRM_INSURANCE_TABLELIST
    {
        private int m_Course;
        private string m_Description;
        private double m_HealthInsurance;
        private Guid m_InsuranceTableListID;
        private string m_InsuranceTableListName;
        private bool m_IsBegin;
        private decimal m_MaximumInsurance;
        private decimal m_MinimumSalary;
        private int m_Month;
        private int m_QuantityHealthInsurance;
        private int m_QuantitySocialInsurance;
        private int m_QuantityUnemploymentInsurance;
        private decimal m_SendHealthInsurance;
        private decimal m_SendSocialInsurance;
        private decimal m_SendUnemploymentInsurance;
        private double m_SocialInsurance;
        private double m_UnemploymentInsurance;
        private decimal m_WageHealthInsurance;
        private decimal m_WageSocialInsurance;
        private decimal m_WageUnemploymentInsurance;
        private int m_Year;

        public HRM_INSURANCE_TABLELIST()
        {
            this.m_InsuranceTableListID = Guid.Empty;
            this.m_InsuranceTableListName = "";
            this.m_Month = 0;
            this.m_Year = 0;
            this.m_Course = 0;
            this.m_IsBegin = true;
            this.m_SocialInsurance = 0.0;
            this.m_HealthInsurance = 0.0;
            this.m_UnemploymentInsurance = 0.0;
            this.m_MinimumSalary = 0M;
            this.m_MaximumInsurance = 0M;
            this.m_QuantitySocialInsurance = 0;
            this.m_QuantityHealthInsurance = 0;
            this.m_QuantityUnemploymentInsurance = 0;
            this.m_WageSocialInsurance = 0M;
            this.m_WageHealthInsurance = 0M;
            this.m_WageUnemploymentInsurance = 0M;
            this.m_SendSocialInsurance = 0M;
            this.m_SendHealthInsurance = 0M;
            this.m_SendUnemploymentInsurance = 0M;
            this.m_Description = "";
        }

        public HRM_INSURANCE_TABLELIST(Guid InsuranceTableListID, string InsuranceTableListName, int Month, int Year, int Course, bool IsBegin, double SocialInsurance, double HealthInsurance, double UnemploymentInsurance, decimal MinimumSalary, decimal MaximumInsurance, int QuantitySocialInsurance, int QuantityHealthInsurance, int QuantityUnemploymentInsurance, decimal WageSocialInsurance, decimal WageHealthInsurance, decimal WageUnemploymentInsurance, decimal SendSocialInsurance, decimal SendHealthInsurance, decimal SendUnemploymentInsurance, string Description)
        {
            this.m_InsuranceTableListID = InsuranceTableListID;
            this.m_InsuranceTableListName = InsuranceTableListName;
            this.m_Month = Month;
            this.m_Year = Year;
            this.m_IsBegin = IsBegin;
            this.m_SocialInsurance = SocialInsurance;
            this.m_HealthInsurance = HealthInsurance;
            this.m_UnemploymentInsurance = UnemploymentInsurance;
            this.m_MinimumSalary = MinimumSalary;
            this.m_MaximumInsurance = MaximumInsurance;
            this.m_Description = Description;
        }

        public void AddCombo(System.Windows.Forms.ComboBox combo)
        {
            GridCalendarControlLib.TableToComboBox(combo, this.GetList(), "InsuranceTableListName", "InsuranceTableListID");
        }

        public void AddComboAll(System.Windows.Forms.ComboBox combo)
        {
            DataTable list = new DataTable();
            list = this.GetList();
            DataRow row = list.NewRow();
            row["InsuranceTableListID"] = "All";
            row["InsuranceTableListName"] = "Tất cả";
            list.Rows.InsertAt(row, 0);
            GridCalendarControlLib.TableToComboBox(combo, list, "InsuranceTableListName", "InsuranceTableListID");
        }

        public void AddComboEdit(ComboBoxEdit combo)
        {
            DataTable list = new DataTable();
            list = this.GetList();
            foreach (DataRow row in list.Rows)
            {
                combo.Properties.Items.Add(row["InsuranceTableListName"]);
            }
        }

        public void AddGridLookupEdit(GridLookUpEdit gridlookup)
        {
            DataTable list = new DataTable();
            list = this.GetList();
            gridlookup.Properties.DataSource = list;
            gridlookup.Properties.DisplayMember = "InsuranceTableListName";
            gridlookup.Properties.ValueMember = "InsuranceTableListID";
        }

        public string Delete()
        {
            string[] myParams = new string[] { "@InsuranceTableListID" };
            object[] myValues = new object[] { this.m_InsuranceTableListID };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery("HRM_INSURANCE_TABLELIST_Delete", myParams, myValues);
        }

        public string Delete(string InsuranceTableListID)
        {
            string[] myParams = new string[] { "@InsuranceTableListID" };
            object[] myValues = new object[] { InsuranceTableListID };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery("HRM_INSURANCE_TABLELIST_Delete", myParams, myValues);
        }

        public string Delete(SqlConnection myConnection, string InsuranceTableListID)
        {
            string[] myParams = new string[] { "@InsuranceTableListID" };
            object[] myValues = new object[] { InsuranceTableListID };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery(myConnection, "HRM_INSURANCE_TABLELIST_Delete", myParams, myValues);
        }

        public string Delete(SqlTransaction myTransaction, string InsuranceTableListID)
        {
            string[] myParams = new string[] { "@InsuranceTableListID" };
            object[] myValues = new object[] { InsuranceTableListID };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery(myTransaction, "HRM_INSURANCE_TABLELIST_Delete", myParams, myValues);
        }

        public bool Exist(string InsuranceTableListID)
        {
            bool hasRows = false;
            string[] myParams = new string[] { "@InsuranceTableListID" };
            object[] myValues = new object[] { InsuranceTableListID };
            SqlHelper helper = new SqlHelper();
            SqlDataReader reader = helper.ExecuteReader("HRM_INSURANCE_TABLELIST_Get", myParams, myValues);
            if (reader != null)
            {
                hasRows = reader.HasRows;
                reader.Close();
                helper.Close();
                reader = null;
            }
            return hasRows;
        }

        public string Get(Guid InsuranceTableListID)
        {
            string str = "";
            string[] myParams = new string[] { "@InsuranceTableListID" };
            object[] myValues = new object[] { InsuranceTableListID };
            SqlHelper helper = new SqlHelper();
            SqlDataReader reader = helper.ExecuteReader("HRM_INSURANCE_TABLELIST_Get", myParams, myValues);
            if (reader != null)
            {
                while (reader.Read())
                {
                    this.m_InsuranceTableListID = reader.GetGuid(reader.GetOrdinal("InsuranceTableListID"));
                    this.m_InsuranceTableListName = Convert.ToString(reader["InsuranceTableListName"]);
                    this.m_Month = Convert.ToInt32(reader["Month"]);
                    this.m_Year = Convert.ToInt32(reader["Year"]);
                    this.m_Course = Convert.ToInt32(reader["Course"]);
                    this.m_IsBegin = Convert.ToBoolean(reader["IsBegin"]);
                    this.m_SocialInsurance = Convert.ToDouble(reader["SocialInsurance"]);
                    this.m_HealthInsurance = Convert.ToDouble(reader["HealthInsurance"]);
                    this.m_UnemploymentInsurance = Convert.ToDouble(reader["UnemploymentInsurance"]);
                    this.m_MinimumSalary = Convert.ToDecimal(reader["MinimumSalary"]);
                    this.m_MaximumInsurance = Convert.ToDecimal(reader["MaximumInsurance"]);
                    this.m_QuantitySocialInsurance = Convert.ToInt32(reader["QuantitySocialInsurance"]);
                    this.m_QuantityHealthInsurance = Convert.ToInt32(reader["QuantityHealthInsurance"]);
                    this.m_QuantityUnemploymentInsurance = Convert.ToInt32(reader["QuantityUnemploymentInsurance"]);
                    this.m_WageSocialInsurance = Convert.ToDecimal(reader["WageSocialInsurance"]);
                    this.m_WageHealthInsurance = Convert.ToDecimal(reader["WageHealthInsurance"]);
                    this.m_WageUnemploymentInsurance = Convert.ToDecimal(reader["WageUnemploymentInsurance"]);
                    this.m_SendSocialInsurance = Convert.ToDecimal(reader["SendSocialInsurance"]);
                    this.m_SendHealthInsurance = Convert.ToDecimal(reader["SendHealthInsurance"]);
                    this.m_SendUnemploymentInsurance = Convert.ToDecimal(reader["SendUnemploymentInsurance"]);
                    this.m_Description = Convert.ToString(reader["Description"]);
                    str = "OK";
                }
                reader.Close();
                helper.Close();
                reader = null;
            }
            return str;
        }

        public string Get(SqlConnection myConnection, Guid InsuranceTableListID)
        {
            string str = "";
            string[] myParams = new string[] { "@InsuranceTableListID" };
            object[] myValues = new object[] { InsuranceTableListID };
            SqlHelper helper = new SqlHelper();
            SqlDataReader reader = helper.ExecuteReader(myConnection, "HRM_INSURANCE_TABLELIST_Get", myParams, myValues);
            if (reader != null)
            {
                while (reader.Read())
                {
                    this.m_InsuranceTableListID = reader.GetGuid(reader.GetOrdinal("InsuranceTableListID"));
                    this.m_InsuranceTableListName = Convert.ToString(reader["InsuranceTableListName"]);
                    this.m_Month = Convert.ToInt32(reader["Month"]);
                    this.m_Year = Convert.ToInt32(reader["Year"]);
                    this.m_Course = Convert.ToInt32(reader["Course"]);
                    this.m_IsBegin = Convert.ToBoolean(reader["IsBegin"]);
                    this.m_SocialInsurance = Convert.ToDouble(reader["SocialInsurance"]);
                    this.m_HealthInsurance = Convert.ToDouble(reader["HealthInsurance"]);
                    this.m_UnemploymentInsurance = Convert.ToDouble(reader["UnemploymentInsurance"]);
                    this.m_MinimumSalary = Convert.ToDecimal(reader["MinimumSalary"]);
                    this.m_MaximumInsurance = Convert.ToDecimal(reader["MaximumInsurance"]);
                    this.m_QuantitySocialInsurance = Convert.ToInt32(reader["QuantitySocialInsurance"]);
                    this.m_QuantityHealthInsurance = Convert.ToInt32(reader["QuantityHealthInsurance"]);
                    this.m_QuantityUnemploymentInsurance = Convert.ToInt32(reader["QuantityUnemploymentInsurance"]);
                    this.m_WageSocialInsurance = Convert.ToDecimal(reader["WageSocialInsurance"]);
                    this.m_WageHealthInsurance = Convert.ToDecimal(reader["WageHealthInsurance"]);
                    this.m_WageUnemploymentInsurance = Convert.ToDecimal(reader["WageUnemploymentInsurance"]);
                    this.m_SendSocialInsurance = Convert.ToDecimal(reader["SendSocialInsurance"]);
                    this.m_SendHealthInsurance = Convert.ToDecimal(reader["SendHealthInsurance"]);
                    this.m_SendUnemploymentInsurance = Convert.ToDecimal(reader["SendUnemploymentInsurance"]);
                    this.m_Description = Convert.ToString(reader["Description"]);
                    str = "OK";
                }
                reader.Close();
                helper.Close();
                reader = null;
            }
            return str;
        }

        public string Get(SqlTransaction myTransaction, Guid InsuranceTableListID)
        {
            string str = "";
            string[] myParams = new string[] { "@InsuranceTableListID" };
            object[] myValues = new object[] { InsuranceTableListID };
            SqlHelper helper = new SqlHelper();
            SqlDataReader reader = helper.ExecuteReader(myTransaction, "HRM_INSURANCE_TABLELIST_Get", myParams, myValues);
            if (reader != null)
            {
                while (reader.Read())
                {
                    this.m_InsuranceTableListID = reader.GetGuid(reader.GetOrdinal("InsuranceTableListID"));
                    this.m_InsuranceTableListName = Convert.ToString(reader["InsuranceTableListName"]);
                    this.m_Month = Convert.ToInt32(reader["Month"]);
                    this.m_Year = Convert.ToInt32(reader["Year"]);
                    this.m_Course = Convert.ToInt32(reader["Course"]);
                    this.m_IsBegin = Convert.ToBoolean(reader["IsBegin"]);
                    this.m_SocialInsurance = Convert.ToDouble(reader["SocialInsurance"]);
                    this.m_HealthInsurance = Convert.ToDouble(reader["HealthInsurance"]);
                    this.m_UnemploymentInsurance = Convert.ToDouble(reader["UnemploymentInsurance"]);
                    this.m_MinimumSalary = Convert.ToDecimal(reader["MinimumSalary"]);
                    this.m_MaximumInsurance = Convert.ToDecimal(reader["MaximumInsurance"]);
                    this.m_QuantitySocialInsurance = Convert.ToInt32(reader["QuantitySocialInsurance"]);
                    this.m_QuantityHealthInsurance = Convert.ToInt32(reader["QuantityHealthInsurance"]);
                    this.m_QuantityUnemploymentInsurance = Convert.ToInt32(reader["QuantityUnemploymentInsurance"]);
                    this.m_WageSocialInsurance = Convert.ToDecimal(reader["WageSocialInsurance"]);
                    this.m_WageHealthInsurance = Convert.ToDecimal(reader["WageHealthInsurance"]);
                    this.m_WageUnemploymentInsurance = Convert.ToDecimal(reader["WageUnemploymentInsurance"]);
                    this.m_SendSocialInsurance = Convert.ToDecimal(reader["SendSocialInsurance"]);
                    this.m_SendHealthInsurance = Convert.ToDecimal(reader["SendHealthInsurance"]);
                    this.m_SendUnemploymentInsurance = Convert.ToDecimal(reader["SendUnemploymentInsurance"]);
                    this.m_Description = Convert.ToString(reader["Description"]);
                    str = "OK";
                }
                reader.Close();
                helper.Close();
                reader = null;
            }
            return str;
        }

        public DataTable GetList()
        {
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteDataTable("HRM_INSURANCE_TABLELIST_GetList");
        }

        public DataTable GetListByYear(int Year)
        {
            string[] myParams = new string[] { "@Year" };
            object[] myValues = new object[] { Year };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteDataTable("HRM_INSURANCE_TABLELIST_GetListByYear", myParams, myValues);
        }

        public DataTable GetProcessList(string EmployeeCode)
        {
            string[] myParams = new string[] { "@EmployeeCode" };
            object[] myValues = new object[] { EmployeeCode };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteDataTable("HRM_INSURANCE_TABLELIST_GetProcessList", myParams, myValues);
        }

        public string Insert()
        {
            string[] myParams = new string[] { 
                "@InsuranceTableListID", "@InsuranceTableListName", "@Month", "@Year", "@Course", "@IsBegin", "@SocialInsurance", "@HealthInsurance", "@UnemploymentInsurance", "@MinimumSalary", "@MaximumInsurance", "@QuantitySocialInsurance", "@QuantityHealthInsurance", "@QuantityUnemploymentInsurance", "@WageSocialInsurance", "@WageHealthInsurance", 
                "@WageUnemploymentInsurance", "@SendSocialInsurance", "@SendHealthInsurance", "@SendUnemploymentInsurance", "@Description"
             };
            object[] myValues = new object[] { 
                this.m_InsuranceTableListID, this.m_InsuranceTableListName, this.m_Month, this.m_Year, this.m_Course, this.m_IsBegin, this.m_SocialInsurance, this.m_HealthInsurance, this.m_UnemploymentInsurance, this.m_MinimumSalary, this.m_MaximumInsurance, this.m_QuantitySocialInsurance, this.m_QuantityHealthInsurance, this.m_QuantityUnemploymentInsurance, this.m_WageSocialInsurance, this.m_WageHealthInsurance, 
                this.m_WageUnemploymentInsurance, this.m_SendSocialInsurance, this.m_SendHealthInsurance, this.m_SendUnemploymentInsurance, this.m_Description
             };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery("HRM_INSURANCE_TABLELIST_Insert", myParams, myValues);
        }

        public string Insert(SqlTransaction myTransaction)
        {
            string[] myParams = new string[] { 
                "@InsuranceTableListID", "@InsuranceTableListName", "@Month", "@Year", "@Course", "@IsBegin", "@SocialInsurance", "@HealthInsurance", "@UnemploymentInsurance", "@MinimumSalary", "@MaximumInsurance", "@QuantitySocialInsurance", "@QuantityHealthInsurance", "@QuantityUnemploymentInsurance", "@WageSocialInsurance", "@WageHealthInsurance", 
                "@WageUnemploymentInsurance", "@SendSocialInsurance", "@SendHealthInsurance", "@SendUnemploymentInsurance", "@Description"
             };
            object[] myValues = new object[] { 
                this.m_InsuranceTableListID, this.m_InsuranceTableListName, this.m_Month, this.m_Year, this.m_Course, this.m_IsBegin, this.m_SocialInsurance, this.m_HealthInsurance, this.m_UnemploymentInsurance, this.m_MinimumSalary, this.m_MaximumInsurance, this.m_QuantitySocialInsurance, this.m_QuantityHealthInsurance, this.m_QuantityUnemploymentInsurance, this.m_WageSocialInsurance, this.m_WageHealthInsurance, 
                this.m_WageUnemploymentInsurance, this.m_SendSocialInsurance, this.m_SendHealthInsurance, this.m_SendUnemploymentInsurance, this.m_Description
             };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery(myTransaction, "HRM_INSURANCE_TABLELIST_Insert", myParams, myValues);
        }

        public string Insert(Guid InsuranceTableListID, string InsuranceTableListName, int Month, int Year, int Course, bool IsBegin, double SocialInsurance, double HealthInsurance, double UnemploymentInsurance, decimal MinimumSalary, decimal MaximumInsurance, int QuantitySocialInsurance, int QuantityHealthInsurance, int QuantityUnemploymentInsurance, decimal WageSocialInsurance, decimal WageHealthInsurance, decimal WageUnemploymentInsurance, decimal SendSocialInsurance, decimal SendHealthInsurance, decimal SendUnemploymentInsurance, string Description)
        {
            string[] myParams = new string[] { 
                "@InsuranceTableListID", "@InsuranceTableListName", "@Month", "@Year", "@Course", "@IsBegin", "@SocialInsurance", "@HealthInsurance", "@UnemploymentInsurance", "@MinimumSalary", "@MaximumInsurance", "@QuantitySocialInsurance", "@QuantityHealthInsurance", "@QuantityUnemploymentInsurance", "@WageSocialInsurance", "@WageHealthInsurance", 
                "@WageUnemploymentInsurance", "@SendSocialInsurance", "@SendHealthInsurance", "@SendUnemploymentInsurance", "@Description"
             };
            object[] myValues = new object[] { 
                InsuranceTableListID, InsuranceTableListName, Month, Year, Course, IsBegin, SocialInsurance, HealthInsurance, UnemploymentInsurance, MinimumSalary, MaximumInsurance, QuantitySocialInsurance, QuantityHealthInsurance, QuantityUnemploymentInsurance, WageSocialInsurance, WageHealthInsurance, 
                WageUnemploymentInsurance, SendSocialInsurance, SendHealthInsurance, SendUnemploymentInsurance, Description
             };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery("HRM_INSURANCE_TABLELIST_Insert", myParams, myValues);
        }

        public string Insert(SqlConnection myConnection, Guid InsuranceTableListID, string InsuranceTableListName, int Month, int Year, int Course, bool IsBegin, double SocialInsurance, double HealthInsurance, double UnemploymentInsurance, decimal MinimumSalary, decimal MaximumInsurance, int QuantitySocialInsurance, int QuantityHealthInsurance, int QuantityUnemploymentInsurance, decimal WageSocialInsurance, decimal WageHealthInsurance, decimal WageUnemploymentInsurance, decimal SendSocialInsurance, decimal SendHealthInsurance, decimal SendUnemploymentInsurance, string Description)
        {
            string[] myParams = new string[] { 
                "@InsuranceTableListID", "@InsuranceTableListName", "@Month", "@Year", "@Course", "@IsBegin", "@SocialInsurance", "@HealthInsurance", "@UnemploymentInsurance", "@MinimumSalary", "@MaximumInsurance", "@QuantitySocialInsurance", "@QuantityHealthInsurance", "@QuantityUnemploymentInsurance", "@WageSocialInsurance", "@WageHealthInsurance", 
                "@WageUnemploymentInsurance", "@SendSocialInsurance", "@SendHealthInsurance", "@SendUnemploymentInsurance", "@Description"
             };
            object[] myValues = new object[] { 
                InsuranceTableListID, InsuranceTableListName, Month, Year, Course, IsBegin, SocialInsurance, HealthInsurance, UnemploymentInsurance, MinimumSalary, MaximumInsurance, QuantitySocialInsurance, QuantityHealthInsurance, QuantityUnemploymentInsurance, WageSocialInsurance, WageHealthInsurance, 
                WageUnemploymentInsurance, SendSocialInsurance, SendHealthInsurance, SendUnemploymentInsurance, Description
             };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery(myConnection, "HRM_INSURANCE_TABLELIST_Insert", myParams, myValues);
        }

        public string Insert(SqlTransaction myTransaction, Guid InsuranceTableListID, string InsuranceTableListName, int Month, int Year, int Course, bool IsBegin, double SocialInsurance, double HealthInsurance, double UnemploymentInsurance, decimal MinimumSalary, decimal MaximumInsurance, int QuantitySocialInsurance, int QuantityHealthInsurance, int QuantityUnemploymentInsurance, decimal WageSocialInsurance, decimal WageHealthInsurance, decimal WageUnemploymentInsurance, decimal SendSocialInsurance, decimal SendHealthInsurance, decimal SendUnemploymentInsurance, string Description)
        {
            string[] myParams = new string[] { 
                "@InsuranceTableListID", "@InsuranceTableListName", "@Month", "@Year", "@Course", "@IsBegin", "@SocialInsurance", "@HealthInsurance", "@UnemploymentInsurance", "@MinimumSalary", "@MaximumInsurance", "@QuantitySocialInsurance", "@QuantityHealthInsurance", "@QuantityUnemploymentInsurance", "@WageSocialInsurance", "@WageHealthInsurance", 
                "@WageUnemploymentInsurance", "@SendSocialInsurance", "@SendHealthInsurance", "@SendUnemploymentInsurance", "@Description"
             };
            object[] myValues = new object[] { 
                InsuranceTableListID, InsuranceTableListName, Month, Year, Course, IsBegin, SocialInsurance, HealthInsurance, UnemploymentInsurance, MinimumSalary, MaximumInsurance, QuantitySocialInsurance, QuantityHealthInsurance, QuantityUnemploymentInsurance, WageSocialInsurance, WageHealthInsurance, 
                WageUnemploymentInsurance, SendSocialInsurance, SendHealthInsurance, SendUnemploymentInsurance, Description
             };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery(myTransaction, "HRM_INSURANCE_TABLELIST_Insert", myParams, myValues);
        }

        public string NewID()
        {
            return SqlHelper.GenCode("HRM_INSURANCE_TABLELIST", "InsuranceTableListID", "CV");
        }

        public string Update()
        {
            string[] myParams = new string[] { 
                "@InsuranceTableListID", "@InsuranceTableListName", "@Month", "@Year", "@Course", "@IsBegin", "@SocialInsurance", "@HealthInsurance", "@UnemploymentInsurance", "@MinimumSalary", "@MaximumInsurance", "@QuantitySocialInsurance", "@QuantityHealthInsurance", "@QuantityUnemploymentInsurance", "@WageSocialInsurance", "@WageHealthInsurance", 
                "@WageUnemploymentInsurance", "@SendSocialInsurance", "@SendHealthInsurance", "@SendUnemploymentInsurance", "@Description"
             };
            object[] myValues = new object[] { 
                this.m_InsuranceTableListID, this.m_InsuranceTableListName, this.m_Month, this.m_Year, this.m_Course, this.m_IsBegin, this.m_SocialInsurance, this.m_HealthInsurance, this.m_UnemploymentInsurance, this.m_MinimumSalary, this.m_MaximumInsurance, this.m_QuantitySocialInsurance, this.m_QuantityHealthInsurance, this.m_QuantityUnemploymentInsurance, this.m_WageSocialInsurance, this.m_WageHealthInsurance, 
                this.m_WageUnemploymentInsurance, this.m_SendSocialInsurance, this.m_SendHealthInsurance, this.m_SendUnemploymentInsurance, this.m_Description
             };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery("HRM_INSURANCE_TABLELIST_Update", myParams, myValues);
        }

        public string Update(Guid InsuranceTableListID, string InsuranceTableListName, int Month, int Year, int Course, bool IsBegin, double SocialInsurance, double HealthInsurance, double UnemploymentInsurance, decimal MinimumSalary, decimal MaximumInsurance, int QuantitySocialInsurance, int QuantityHealthInsurance, int QuantityUnemploymentInsurance, decimal WageSocialInsurance, decimal WageHealthInsurance, decimal WageUnemploymentInsurance, decimal SendSocialInsurance, decimal SendHealthInsurance, decimal SendUnemploymentInsurance, string Description)
        {
            string[] myParams = new string[] { 
                "@InsuranceTableListID", "@InsuranceTableListName", "@Month", "@Year", "@Course", "@IsBegin", "@SocialInsurance", "@HealthInsurance", "@UnemploymentInsurance", "@MinimumSalary", "@MaximumInsurance", "@QuantitySocialInsurance", "@QuantityHealthInsurance", "@QuantityUnemploymentInsurance", "@WageSocialInsurance", "@WageHealthInsurance", 
                "@WageUnemploymentInsurance", "@SendSocialInsurance", "@SendHealthInsurance", "@SendUnemploymentInsurance", "@Description"
             };
            object[] myValues = new object[] { 
                InsuranceTableListID, InsuranceTableListName, Month, Year, Course, IsBegin, SocialInsurance, HealthInsurance, UnemploymentInsurance, MinimumSalary, MaximumInsurance, QuantitySocialInsurance, QuantityHealthInsurance, QuantityUnemploymentInsurance, WageSocialInsurance, WageHealthInsurance, 
                WageUnemploymentInsurance, SendSocialInsurance, SendHealthInsurance, SendUnemploymentInsurance, Description
             };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery("HRM_INSURANCE_TABLELIST_Update", myParams, myValues);
        }

        public string Update(SqlConnection myConnection, Guid InsuranceTableListID, string InsuranceTableListName, int Month, int Year, int Course, bool IsBegin, double SocialInsurance, double HealthInsurance, double UnemploymentInsurance, decimal MinimumSalary, decimal MaximumInsurance, int QuantitySocialInsurance, int QuantityHealthInsurance, int QuantityUnemploymentInsurance, decimal WageSocialInsurance, decimal WageHealthInsurance, decimal WageUnemploymentInsurance, decimal SendSocialInsurance, decimal SendHealthInsurance, decimal SendUnemploymentInsurance, string Description)
        {
            string[] myParams = new string[] { 
                "@InsuranceTableListID", "@InsuranceTableListName", "@Month", "@Year", "@Course", "@IsBegin", "@SocialInsurance", "@HealthInsurance", "@UnemploymentInsurance", "@MinimumSalary", "@MaximumInsurance", "@QuantitySocialInsurance", "@QuantityHealthInsurance", "@QuantityUnemploymentInsurance", "@WageSocialInsurance", "@WageHealthInsurance", 
                "@WageUnemploymentInsurance", "@SendSocialInsurance", "@SendHealthInsurance", "@SendUnemploymentInsurance", "@Description"
             };
            object[] myValues = new object[] { 
                InsuranceTableListID, InsuranceTableListName, Month, Year, Course, IsBegin, SocialInsurance, HealthInsurance, UnemploymentInsurance, MinimumSalary, MaximumInsurance, QuantitySocialInsurance, QuantityHealthInsurance, QuantityUnemploymentInsurance, WageSocialInsurance, WageHealthInsurance, 
                WageUnemploymentInsurance, SendSocialInsurance, SendHealthInsurance, SendUnemploymentInsurance, Description
             };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery(myConnection, "HRM_INSURANCE_TABLELIST_Update", myParams, myValues);
        }

        public string Update(SqlTransaction myTransaction, Guid InsuranceTableListID, string InsuranceTableListName, int Month, int Year, int Course, bool IsBegin, double SocialInsurance, double HealthInsurance, double UnemploymentInsurance, decimal MinimumSalary, decimal MaximumInsurance, int QuantitySocialInsurance, int QuantityHealthInsurance, int QuantityUnemploymentInsurance, decimal WageSocialInsurance, decimal WageHealthInsurance, decimal WageUnemploymentInsurance, decimal SendSocialInsurance, decimal SendHealthInsurance, decimal SendUnemploymentInsurance, string Description)
        {
            string[] myParams = new string[] { 
                "@InsuranceTableListID", "@InsuranceTableListName", "@Month", "@Year", "@Course", "@IsBegin", "@SocialInsurance", "@HealthInsurance", "@UnemploymentInsurance", "@MinimumSalary", "@MaximumInsurance", "@QuantitySocialInsurance", "@QuantityHealthInsurance", "@QuantityUnemploymentInsurance", "@WageSocialInsurance", "@WageHealthInsurance", 
                "@WageUnemploymentInsurance", "@SendSocialInsurance", "@SendHealthInsurance", "@SendUnemploymentInsurance", "@Description"
             };
            object[] myValues = new object[] { 
                InsuranceTableListID, InsuranceTableListName, Month, Year, Course, IsBegin, SocialInsurance, HealthInsurance, UnemploymentInsurance, MinimumSalary, MaximumInsurance, QuantitySocialInsurance, QuantityHealthInsurance, QuantityUnemploymentInsurance, WageSocialInsurance, WageHealthInsurance, 
                WageUnemploymentInsurance, SendSocialInsurance, SendHealthInsurance, SendUnemploymentInsurance, Description
             };
            SqlHelper helper = new SqlHelper();
            return helper.ExecuteNonQuery(myTransaction, "HRM_INSURANCE_TABLELIST_Update", myParams, myValues);
        }

        [Category("Column"), DisplayName("Course")]
        public int Course
        {
            get
            {
                return this.m_Course;
            }
            set
            {
                this.m_Course = value;
            }
        }

        [DisplayName("Description"), Category("Column")]
        public string Description
        {
            get
            {
                return this.m_Description;
            }
            set
            {
                this.m_Description = value;
            }
        }

        [Category("Column"), DisplayName("HealthInsurance")]
        public double HealthInsurance
        {
            get
            {
                return this.m_HealthInsurance;
            }
            set
            {
                this.m_HealthInsurance = value;
            }
        }

        [Category("Primary Key"), DisplayName("InsuranceTableListID")]
        public Guid InsuranceTableListID
        {
            get
            {
                return this.m_InsuranceTableListID;
            }
            set
            {
                this.m_InsuranceTableListID = value;
            }
        }

        [Category("Column"), DisplayName("InsuranceTableListName")]
        public string InsuranceTableListName
        {
            get
            {
                return this.m_InsuranceTableListName;
            }
            set
            {
                this.m_InsuranceTableListName = value;
            }
        }

        [DisplayName("IsBegin"), Category("Column")]
        public bool IsBegin
        {
            get
            {
                return this.m_IsBegin;
            }
            set
            {
                this.m_IsBegin = value;
            }
        }

        [DisplayName("MaximumInsurance"), Category("Column")]
        public decimal MaximumInsurance
        {
            get
            {
                return this.m_MaximumInsurance;
            }
            set
            {
                this.m_MaximumInsurance = value;
            }
        }

        [Category("Column"), DisplayName("MinimumSalary")]
        public decimal MinimumSalary
        {
            get
            {
                return this.m_MinimumSalary;
            }
            set
            {
                this.m_MinimumSalary = value;
            }
        }

        [DisplayName("Month"), Category("Column")]
        public int Month
        {
            get
            {
                return this.m_Month;
            }
            set
            {
                this.m_Month = value;
            }
        }

        public string ProductName
        {
            get
            {
                return "Class HRM_INSURANCE_TABLELIST";
            }
        }

        public string ProductVersion
        {
            get
            {
                return "1.0.0.0";
            }
        }

        [Category("Column"), DisplayName("QuantityHealthInsurance")]
        public int QuantityHealthInsurance
        {
            get
            {
                return this.m_QuantityHealthInsurance;
            }
            set
            {
                this.m_QuantityHealthInsurance = value;
            }
        }

        [Category("Column"), DisplayName("QuantitySocialInsurance")]
        public int QuantitySocialInsurance
        {
            get
            {
                return this.m_QuantitySocialInsurance;
            }
            set
            {
                this.m_QuantitySocialInsurance = value;
            }
        }

        [DisplayName("QuantityUnemploymentInsurance"), Category("Column")]
        public int QuantityUnemploymentInsurance
        {
            get
            {
                return this.m_QuantityUnemploymentInsurance;
            }
            set
            {
                this.m_QuantityUnemploymentInsurance = value;
            }
        }

        [DisplayName("SendHealthInsurance"), Category("Column")]
        public decimal SendHealthInsurance
        {
            get
            {
                return this.m_SendHealthInsurance;
            }
            set
            {
                this.m_SendHealthInsurance = value;
            }
        }

        [Category("Column"), DisplayName("SendSocialInsurance")]
        public decimal SendSocialInsurance
        {
            get
            {
                return this.m_SendSocialInsurance;
            }
            set
            {
                this.m_SendSocialInsurance = value;
            }
        }

        [Category("Column"), DisplayName("SendUnemploymentInsurance")]
        public decimal SendUnemploymentInsurance
        {
            get
            {
                return this.m_SendUnemploymentInsurance;
            }
            set
            {
                this.m_SendUnemploymentInsurance = value;
            }
        }

        [DisplayName("SocialInsurance"), Category("Column")]
        public double SocialInsurance
        {
            get
            {
                return this.m_SocialInsurance;
            }
            set
            {
                this.m_SocialInsurance = value;
            }
        }

        [DisplayName("UnemploymentInsurance"), Category("Column")]
        public double UnemploymentInsurance
        {
            get
            {
                return this.m_UnemploymentInsurance;
            }
            set
            {
                this.m_UnemploymentInsurance = value;
            }
        }

        [DisplayName("WageHealthInsurance"), Category("Column")]
        public decimal WageHealthInsurance
        {
            get
            {
                return this.m_WageHealthInsurance;
            }
            set
            {
                this.m_WageHealthInsurance = value;
            }
        }

        [DisplayName("WageSocialInsurance"), Category("Column")]
        public decimal WageSocialInsurance
        {
            get
            {
                return this.m_WageSocialInsurance;
            }
            set
            {
                this.m_WageSocialInsurance = value;
            }
        }

        [DisplayName("WageUnemploymentInsurance"), Category("Column")]
        public decimal WageUnemploymentInsurance
        {
            get
            {
                return this.m_WageUnemploymentInsurance;
            }
            set
            {
                this.m_WageUnemploymentInsurance = value;
            }
        }

        [DisplayName("Year"), Category("Column")]
        public int Year
        {
            get
            {
                return this.m_Year;
            }
            set
            {
                this.m_Year = value;
            }
        }
    }
}

